<style type="text/css">
    .sam_line {
        border-bottom: 1px solid #ccc;
        overflow: hidden;
        padding: 0px 5px;
    }
    .sam_line .sam_right {
        width: 50%;
        float: left;
    }
    .sam_line .sam_left{
        float: left;
        border-left: 1px solid #ccc;
    }
    .sam_line .sam_left .layui-form-item{
        margin-bottom:0px;
    }
    .sam_line .sam_font{
        color: #929191;
    }
    .sam_line .sam_font_red{
        color: #c91919;
    }
    .sam_line .left30{
        padding-left: 30px;
    }
	.layui-form-label{padding:8px 5px;}
	.layui-input{width:auto;display:inline;}
</style>
<form class="layui-form" action="{:url()}" method="post" id="editForm">
  <div class="sam_line">
      <div class="sam_right">
          <div class="sam_font_red">1,【面辅料】差异值百分比</div>
          <div class="left30">
              <div class="sam_font">客户单价VS档口采购单价</div>
              <div class="layui-input-inline ">
                  <input type="text" class="required layui-input field-client_ordernum" name="type_percent[1]" value="{$config_0.type_percent[1]}" autocomplete="off" placeholder="百分号如: 50%" lay-verify="required|number">%
              </div>
          </div>
      </div>
      <div class="sam_left">
          <div style="padding-left: 50px;" class="sam_font">关闭后，不再自动生成任务，只支持手动添加</div>
          <div>
              <div class="layui-form-item">
                  <label class="layui-form-label">1.面料</label>
                  <div class="layui-input-block">
                      <input type="checkbox" name="m_type[1][fabric]" lay-skin="switch" {if isset($config_0['m_type']['1']['fabric']) } checked {/if}>
                  </div>
              </div>
              <div class="layui-form-item">
                  <label class="layui-form-label">2.里料</label>
                  <div class="layui-input-block">
                      <input type="checkbox" name="m_type[1][lining]" lay-skin="switch" {if isset($config_0['m_type']['1']['lining']) } checked {/if}>
                  </div>
              </div>
              <div class="layui-form-item">
                  <label class="layui-form-label">3.辅料</label>
                  <div class="layui-input-block">
                      <input type="checkbox" name="m_type[1][accessories]" lay-skin="switch" {if isset($config_0['m_type']['1']['accessories']) } checked {/if}>
                  </div>
              </div>
              <div class="layui-form-item">
                  <label class="layui-form-label">4.其它</label>
                  <div class="layui-input-block">
                      <input type="checkbox" name="m_type[1][other]" lay-skin="switch" {if isset($config_0['m_type']['1']['other']) } checked {/if}>
                  </div>
              </div>
          </div>
      </div>
  </div>
    <div class="sam_line">
        <div class="sam_right">
            <div class="sam_font_red">2,【单件用量】差异值百分比</div>
            <div class="left30">
                <div class="sam_font">客户用量VS真实拉布用量</div>
                <div class="layui-input-inline ">
                    <input type="text" class="required layui-input field-client_ordernum" name="type_percent[2]" value="{$config_0.type_percent[2]}" autocomplete="off" placeholder="百分号如: 50%" lay-verify="required|number">%
                </div>
            </div>
        </div>
        <div class="sam_left">
            <div style="padding-left: 50px;" class="sam_font">关闭后，不再自动生成任务，只支持手动添加</div>
            <div>
                <div class="layui-form-item">
                    <label class="layui-form-label">1.面料</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="m_type[2][fabric]" lay-skin="switch" {if isset($config_0['m_type']['2']['fabric']) } checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">2.里料</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="m_type[2][lining]" lay-skin="switch" {if isset($config_0['m_type']['2']['lining']) } checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">3.辅料</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="m_type[2][accessories]" lay-skin="switch" {if isset($config_0['m_type']['2']['accessories']) } checked {/if}>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">4.其它</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="m_type[2][other]" lay-skin="switch" {if isset($config_0['m_type']['2']['other']) } checked {/if}>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div class="sam_line">
        <div class="sam_font_red">3,【工艺染色】价格低于对应值时，自动生成核价</div>
        <div class="left30">
            <div class="sam_font">工艺含有染色 且 单价低于 设定值</div>
            <div class="layui-input-inline ">
                低于<input type="text" class="required layui-input field-client_ordernum" name="type_percent[3]" value="{$config_0.type_percent[3]}" autocomplete="off" placeholder="百分号如: 50%" lay-verify="required|number">生成核价
            </div>
            <div class="layui-input-inline" style="margin-left: 20px;">
                <input type="checkbox" name="m_type[3]" lay-skin="switch" {if isset($config_0['m_type']['3']) } checked {/if}>
                <label class="layui-form-label" style="float: right;width: auto;color:#929191 !important;">关闭后，不再自动生成任务，只支持手动添加</label>
            </div>
        </div>
    </div>
    <div class="pop-bottom-bar">
    	<input type="hidden" name="type" value="0">
        <button type="submit" class="layui-btn layui-btn-normal" lay-submit="" lay-filter="formSubmit" hisi-data="{pop: true, refresh: true}">提交保存</button>
        <a href="javascript:parent.layui.layer.closeAll();" class="layui-btn layui-btn-primary ml10">取消</a>
    </div>
</form>

{include file="system@block/layui" /}
    
<script>
    var formData = {:json_encode($formData)};
    layui.use(['form', 'func'], function() {
        var $ = layui.jquery, form = layui.form;
        // layui.func.assign(formData);

        // form.verify({
        //     mimonumber: function(value, item){
        //         if (value=='') return '';
        //         if(! reg.test(value)){
        //             return '只能填写数字';
        //         }
        //     }
        // });
    });
</script>